/*
 *  This file is part of Spidex.
 *  
 *  Spidex is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *  
 *  Spidex is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *  
 *  You should have received a copy of the GNU General Public License
 *  along with Spidex.  If not, see <http://www.gnu.org/licenses/>.
 */

package spidex.dbmanager;

/**
 *
 * @author xatrix
 */
public class ConditionType {
    private final int type;
    private final String dbname;
    private final boolean isNumber;
    
    public ConditionType(int type, boolean isNumber,String dbname) {
        this.type = type;
        this.isNumber = isNumber;
        this.dbname = dbname;
        
    }
    
    public int getType() {
        return type;
    }
    public boolean isNumber() {
        return isNumber;
    }
    public String getDbName() {
        return dbname;
    }

            
    public final static ConditionType ID = new ConditionType(0,true,"film.id");
    public final static ConditionType FILMNAME = 
            new ConditionType(1,false,"film.name");
    public final static ConditionType FILMYEAR =
            new ConditionType(2,true,"film.year");
    public final static ConditionType FILMRATING =
            new ConditionType(3,true,"film.rating");
    public final static ConditionType FILMGENRE =
            new ConditionType(4,false,"film.genre");
    public final static ConditionType ACTORNAME =
            new ConditionType(5,false,"actor.name");
    public final static ConditionType DIRECTORNAME =
            new ConditionType(6,false,"director.name");
}
